﻿package mortal.game.view.copy.GroupTowerCopy.data
{
    import com.gengine.resource.*;
    import mortal.game.resource.tableConfig.*;

    public class GroupTowerConfig extends Object
    {
        private var _dic:Object;
        private static var _instance:GroupTowerConfig;
        public static var cfgObj:Object;

        public function GroupTowerConfig()
        {
            this._dic = new Object();
            this.init();
            return;
        }// end function

        private function init() : void
        {
            var _loc_2:Object = null;
            var _loc_1:* = ConfigManager.instance.getJSONByFileName("t_tower_copy.json");
            if (_loc_1 == null)
            {
                _loc_1 = TowerCopyConfig.cfgObj;
            }
            cfgObj = _loc_1;
            for each (_loc_2 in _loc_1)
            {
                
                this._dic[_loc_2.copyId + "_" + _loc_2.level] = _loc_2;
            }
            return;
        }// end function

        public function getInfoByCodeAndLvl(param1:int, param2:int) : Object
        {
            return this._dic[param1 + "_" + param2];
        }// end function

        public static function get instance() : GroupTowerConfig
        {
            if (_instance == null)
            {
                _instance = new GroupTowerConfig;
            }
            return _instance;
        }// end function

    }
}
